package cn.bdqn.mapper;

import cn.bdqn.pojo.ItripHotel;
import cn.bdqn.pojo.ItripHotelWithBLOBs;
import cn.bdqn.pojo.ItripLabelDic;
import cn.bdqn.vo.ItripSearchFacilitiesHotelVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripHotelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ItripHotelWithBLOBs record);

    int insertSelective(ItripHotelWithBLOBs record);

    ItripHotelWithBLOBs selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ItripHotelWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(ItripHotelWithBLOBs record);

    int updateByPrimaryKey(ItripHotel record);

    /**
     *  根据酒店ID获取特色
     * @param id
     * @return
     * @throws Exception
     */
    public List<ItripLabelDic> getHotelFeatureByHotelId(@Param(value = "id") Long id);

    /**
     * 通过酒店ID获取酒店信息
     * @param id
     * @return
     * @throws Exception
     */
    public ItripHotel getItripHotelById(@Param(value = "id") Long id);

    ItripSearchFacilitiesHotelVO getItripHotelFacilitiesById(@Param(value="id") Long id);

    ItripHotel selectById(Integer hotelId);


    /**
     * 根据酒店ID获取评论数
     * @param map
     * @return
     */
    Integer getCommentCountByHotelId(Map<String ,Object> map);
}